package com.itheima.health.dao;

import com.itheima.health.pojo.Member;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface MemberDao {

    Integer findMemberCountBeforeDate(String date);

    Integer findMemberCountByDate(String date);

    Integer findMemberCount();

    Integer findMemberCountWeekByDate(String date);

    Integer findMemberCountMonthByDate(String date);


    /**
     * 插入
     * @param member
     */
    void insert(Member member);

    /**
     * 根据ID查询
     * @param id
     * @return
     */
    Member selectById(@Param("id") Integer id);

    /**
     * 根据id更新非空字段
     * @param member
     */
    void updateByIdSelective(Member member);

    /**
     * 根据手机号查询
     * @param phoneNumber
     * @return
     */
    Member selectByPhoneNumber(@Param("phoneNumber") String phoneNumber);


}
